﻿<?php
class BaseActive {
	var $_view = null; //视图实体
	var $_app = null; //实体
	var $_db = null; //数据库基本实体	
	var $_return = ''; //返回数据	
	function __construct($act = null) {
		$this->BaseActive($act);
	}
	function BaseActive($act = null) {
		$this->_view = & get_view();
	    $this->_app = & get_app();
		$this->_db = & get_db();
		if ($act && $act {
			0 }
		!= '_' && method_exists($this, $act)) {
			$this->_return = $this-> $act (); //运行动作
		} else {
			exit ('missing_active_action');
		}
	}

	function _assign($k, $v = null) {
		$this->_view->assign($k, $v);
	}

	function & _model($name) {
        return $this->_app->_model($name);
	}	
	
}
?>